<?php
/**
 * CodeIgniter
 *
 * An open source application development framework for PHP
 *
 * This content is released under the MIT License (MIT)
 *
 * Copyright (c) 2014 - 2016, British Columbia Institute of Technology
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * @package	CodeIgniter
 * @author	EllisLab Dev Team
 * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
 * @copyright	Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)
 * @license	http://opensource.org/licenses/MIT	MIT License
 * @link	https://codeigniter.com
 * @since	Version 1.0.0
 * @filesource
 */
defined('BASEPATH') OR exit('No direct script access allowed');


// ------------------------------------------------------------------------


/**
 * Site name
 *
 * Create a local URL based on your basepath. Segments can be passed via the
 * first parameter either as a string or an array.
 *
 * @access	public
 * @param	string
 * @return	string
 */
if ( ! function_exists('site_web_name'))
{
	function site_web_name($name = '')
	{
		$CI =& get_instance();
		return $CI->config->site_web_name($name);
	}
}


/**
 * Site keyword
 *
 * Create a local URL based on your basepath. Segments can be passed via the
 * first parameter either as a string or an array.
 *
 * @access	public
 * @param	string
 * @return	string
 */
if ( ! function_exists('site_web_keyword'))
{
	function site_web_keyword($name = '')
	{
		$CI =& get_instance();
		return $CI->config->site_web_keyword($name);
	}
}

/**
 * Site description
 *
 * Create a local URL based on your basepath. Segments can be passed via the
 * first parameter either as a string or an array.
 *
 * @access	public
 * @param	string
 * @return	string
 */
if ( ! function_exists('site_web_description'))
{
	function site_web_description($name = '')
	{
		$CI =& get_instance();
		return $CI->config->site_web_description($name);
	}
}

// ------------------------------------------------------------------------

/**
 * 
 *
 */

if ( ! function_exists('get_ico_url'))
{
	function get_ico_url()
	{
		$CI =& get_instance();
		return $CI->config->get_ico_url();
	}
}

/**
 * 
 *
 */

if ( ! function_exists('get_web_url'))
{
	function get_web_url($style = '',$uri = '',$mark = '')
	{
		$CI =& get_instance();
		return $CI->config->get_web_url($style,$uri,$mark);
	}
}


if ( ! function_exists('pic2bq')){

	function pic2bq($string = NULL)
    {
        #
        $pic_url = get_web_url("pic","","");
        $bq_name = "{{PICURL}}";
        $string = str_replace($pic_url,$bq_name,$string);
        return $string;
    }
}

if ( ! function_exists('bq2pic')){
    function bq2pic($string = NULL)
    {
        $pic_url = get_web_url("pic","","");
        $bq_name = "{{PICURL}}";
        $string = str_replace($bq_name,$pic_url,$string);
        return $string;
    }
}

